CmpShiShen <- function(MyTiangan,Bazi){
  ## 导入信息表
  source('GenInfoTable.R',encoding = 'UTF-8')
  InfoTable <- GenInfoTable()
  ## 输入的其他天干
  # MyTiangan <- '戊'
  MyFivexing <- InfoTable$five[InfoTable$Tiangan == MyTiangan]
  MyNegPos <- InfoTable$PosNeg[InfoTable$Tiangan == MyTiangan]
  ## 日干
  RiganWuxing <- InfoTable$five[InfoTable$Tiangan == Bazi[5]]
  RiganNegPos <- InfoTable$PosNeg[InfoTable$Tiangan == Bazi[5]]
  ## 计算
  FiveXing <- c('木','火','土','金','水')
  d <- which(FiveXing == RiganWuxing) - which(FiveXing == MyFivexing)
  if (d == 0){
    if (RiganNegPos == MyNegPos){
      ShiShen <- paste(MyTiangan,MyFivexing,'（',MyNegPos,'）', '：','比肩',sep = '')
    }else {
      ShiShen <- paste(MyTiangan,MyFivexing,'（',MyNegPos,'）', '：','劫财',sep = '')
    }
  }else if (d == -1 || d== 4){
    if (RiganNegPos == MyNegPos){
      ShiShen <- paste(MyTiangan,MyFivexing,'（',MyNegPos,'）', '：','食神',sep = '')
    }else {
      ShiShen <- paste(MyTiangan,MyFivexing,'（',MyNegPos,'）', '：','伤官',sep = '')
    }
  }else if (d == -2 || d == 3){
    if (RiganNegPos == MyNegPos){
      ShiShen <- paste(MyTiangan,MyFivexing,'（',MyNegPos,'）', '：','偏财',sep = '')
    }else {
      ShiShen <- paste(MyTiangan,MyFivexing,'（',MyNegPos,'）', '：','正财',sep = '')
    }
  }else if (d == -3 || d == 2){
    if (RiganNegPos == MyNegPos){
      ShiShen <- paste(MyTiangan,MyFivexing,'（',MyNegPos,'）', '：','七杀',sep = '')
    }else {
      ShiShen <- paste(MyTiangan,MyFivexing,'（',MyNegPos,'）', '：','正官',sep = '')
    }
  }else if (d == -4 || d == 1){
    if (RiganNegPos == MyNegPos){
      ShiShen <- paste(MyTiangan,MyFivexing,'（',MyNegPos,'）', '：','枭神',sep = '')
    }else {
      ShiShen <- paste(MyTiangan,MyFivexing,'（',MyNegPos,'）', '：','正印',sep = '')
    }
  }
  return(ShiShen)
}